-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: change status bar color when in production org setting #5519
base: develop
Are you sure you want to change the base?
Conversation
Create a setting to allow the status bar to change color when the default org is a production one fix forcedotcom#5517
Thanks for the contribution! Before we can merge this, we need @PierreVanobbergen to sign the Salesforce Inc. Contributor License Agreement. |
Some notes about the feature/PR:
Thank you :) |
Hi @PierreVanobbergen, thank you for this contribution! I just saw the video you shared in the issue, and the comment I have is that the color should apply to only the org picker (that element where the org alias is displayed), because we have other items in the bottom bar that have colors according to the state and we would miss that with how this is working now. Do you think you could limit the feature to just the org picker? Thanks! |
export const colorWhenProductionOrg = async () => { | ||
const baseColorStatusBar = new vscode.ThemeColor('statusBar.background'); | ||
|
||
const colorWHenProductionOrgHandler = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo colorWHenProductionOrgHandler -> colorWhenProductionOrgHandler
}; | ||
|
||
WorkspaceContext.getInstance().onOrgChange(() => | ||
colorWHenProductionOrgHandler() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix typo
*/ | ||
vscode.window.onDidChangeWindowState(async e => { | ||
if (e.focused) { | ||
await colorWHenProductionOrgHandler(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here as well
); | ||
} | ||
}); | ||
return await colorWHenProductionOrgHandler(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And one more here
@@ -114,6 +114,15 @@ export class OrgAuthInfo { | |||
); | |||
} | |||
|
|||
public static async isAProductionOrg(username: string): Promise<boolean> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review https://forcedotcom.github.io/sfdx-core/classes/org_org.Org-1.html to determine this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peternhale is there an affirmative case for "this is a production org"? I'm not seeing that in these docs, so it's looking like Production would be the fallback case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@randi274 Yes. production should be the fallback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! @interfaceconjurer and I were chatting about this detail today, it might be worth y'all discussing the possibility of "Production" being overly inclusive.
I thought about just changing the color of the org picker as well, but I feel that it might not be enough of an eye catcher 👀 . We might even add more element later in the picklist. What do you think about it @CristiCanizales ? |
fix #5517
What does this PR do?
Create a setting to allow the status bar to change color when the default org is a production one
What issues does this PR fix or reference?
Check #5517 for details